import QtQuick
import QtQuick.Controls

Window {
    width: 400
    height: 300
    visible: true
    title: qsTr("Slider - Style1")

    Slider {
        anchors.centerIn: parent
        width: parent.width * 0.8
        handle: Rectangle {
            x: parent.leftPadding + (parent.horizontal ? parent.visualPosition * (parent.availableWidth - width) : (parent.availableWidth - width) / 2)
            y: parent.topPadding + (parent.horizontal ? (parent.availableHeight - height) / 2 : parent.visualPosition * (parent.availableHeight - height))
            width: 24
            height: 24
            radius: 12
            color: parent.pressed ? "#f0f0f0" : "#ffffff"
            border.color: "#cccccc"

            Rectangle {
                anchors.centerIn: parent
                width: 8
                height: 8
                radius: 4
                color: "#21be2b"
            }
        }
    }
}
